<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>地区项目数量列表</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #f4f4f4;
            margin: 0;
            padding: 0;
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
        }
        .container {
            background-color: #fff;
            padding: 20px;
            border-radius: 8px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
            width: 80%;
            max-width: 800px;
        }
        h1 {
            font-size: 24px;
            color: #333;
            text-align: center;
            margin-bottom: 20px;
        }
        .btn {
            display: inline-block;
            padding: 8px 16px;
            margin: 5px;
            text-decoration: none;
            color: white;
            border-radius: 5px;
            transition: background-color 0.3s;
        }
        .btn-primary {
            background-color: #5cb85c;
        }
        .btn-primary:hover {
            background-color: #4cae4c;
        }
        .btn-warning {
            background-color: #f0ad4e;
        }
        .btn-warning:hover {
            background-color: #eea236;
        }
        .btn-danger {
            background-color: #d9534f;
        }
        .btn-danger:hover {
            background-color: #c9302c;
        }
        .table {
            width: 100%;
            border-collapse: collapse;
            margin-bottom: 20px;
        }
        .table th, .table td {
            padding: 12px;
            text-align: left;
            border-bottom: 1px solid #ddd;
        }
        .table th {
            background-color: #f2f2f2;
        }
        .table-striped tbody tr:nth-child(even) {
            background-color: #f9f9f9;
        }
    </style>
</head>
<body>
    <div class="container">
        <h1>地区项目数量列表</h1>
        <a href="{% url 'create_dataalla' %}" class="btn btn-primary">新建</a>
        <table class="table table-striped">
            <thead>
                <tr>
                    <th>ID</th>
                    <th>地区</th>
                    <th>总奖金金额</th>
                    <th>操作</th>
                </tr>
            </thead>
            <tbody>
                {% for data in data_list %}
                <tr>
                    <td>{{ data.id }}</td>
                    <td>{{ data.region }}</td>
                    <td>{{ data.total_award_amount }}</td>
                    <td>
                        <a href="{% url 'update_dataalla' data.pk %}" class="btn btn-warning btn-sm">编辑</a>
                        <a href="{% url 'delete_dataalla' data.pk %}" class="btn btn-danger btn-sm">删除</a>
                    </td>
                </tr>
                {% endfor %}
            </tbody>
        </table>
    </div>
</body>
</html>